/*
 * @Author: Ping Chou
 * @Date: 2021-11-25 14:53:27
 * @LastEditTime: 2021-12-28 16:57:05
 * @LastEditors: zhouping
 * @Description:
 * @FilePath: /test1/async.js
 */

function api() {
  return new Promise(resolve => {
    resolve(1)
  })
}
async function getData() {
  const data = await api()
  console.log(data, 'data')
}

getData()

// async function f2() {
//   const rs = await getData()
//   console.log(rs)
// }
// async function f1() {
//   await f2()
//   console.log(3)
// }
// f1()
